package file;

import java.io.File;

/**
 * Creared with IntelliJ IDEA.
 * Description:
 * User:yxd
 * Date:2022-04-05
 * Time:18:50
 */
public class Demo4 {
    public static void main(String[] args) {
        File f = new File("./text.txt");
        f.delete();//删除文件(立即删除)
        System.out.println("完成删除");
        //f.deleteOnExit();//文件退出之后再删除
    }
}
